/*
 * Copyright (c) 2020 Fraunhofer FOKUS and others. All rights reserved.
 *
 * See the NOTICE file(s) distributed with this work for additional
 * information regarding copyright ownership.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License 2.0 which is available at
 * http://www.eclipse.org/legal/epl-2.0
 *
 * SPDX-License-Identifier: EPL-2.0
 *
 * Contact: mosaic@fokus.fraunhofer.de
 */

package org.eclipse.mosaic.fed.mqtt.config;

import org.eclipse.mosaic.lib.objects.vehicle.VehicleDeparture;

import java.util.List;

public class CVehicleAdd {

    private String route;

    private String group;

    private int lane;

    private int pos;

    private double departSpeed;

    private VehicleDeparture.DepartSpeedMode departSpeedMode = VehicleDeparture.DepartSpeedMode.MAXIMUM;

    private VehicleDeparture.LaneSelectionMode laneSelectionMode = VehicleDeparture.LaneSelectionMode.DEFAULT;

    private List<String> applications;

    private String protoTypeName;


    public VehicleDeparture extractVehicleDeparture() {
        return new VehicleDeparture.Builder(route)
                .departureLane(laneSelectionMode, lane, pos)
                .departureSpeed(departSpeedMode, departSpeed)
                .create();
    }


    public String getRoute() {
        return route;
    }

    public void setRoute(String route) {
        this.route = route;
    }

    public String getGroup() {
        return group;
    }

    public void setGroup(String group) {
        this.group = group;
    }

    public int getLane() {
        return lane;
    }

    public void setLane(int lane) {
        this.lane = lane;
    }

    public int getPos() {
        return pos;
    }

    public void setPos(int pos) {
        this.pos = pos;
    }

    public double getDepartSpeed() {
        return departSpeed;
    }

    public void setDepartSpeed(double departSpeed) {
        this.departSpeed = departSpeed;
    }

    public VehicleDeparture.DepartSpeedMode getDepartSpeedMode() {
        return departSpeedMode;
    }

    public void setDepartSpeedMode(VehicleDeparture.DepartSpeedMode departSpeedMode) {
        this.departSpeedMode = departSpeedMode;
    }

    public List<String> getApplications() {
        return applications;
    }

    public void setApplications(List<String> applications) {
        this.applications = applications;
    }

    public String getProtoTypeName() {
        return protoTypeName;
    }

    public void setProtoTypeName(String protoTypeName) {
        this.protoTypeName = protoTypeName;
    }
}
